<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>

    <meta name="description" content="描述">
    <meta name="keywords" content="关键词">
    <link rel="icon" href="">
    <link rel="shortcut icon" href="">
    <title>电梯采购网</title>

    <script src="/web/lib/jquery-1.12.4.min.js"></script>
    <script src="/web/public/public.js"></script>
    <script src="/web/lib/jquery.pagination.js"></script>
    <link rel="stylesheet" href="/web/public/css/public.css">
    <link rel="stylesheet" href="/web/public/css/header.css">
    <link rel="stylesheet" href="/web/public/css/footer.css">
    <link rel="stylesheet" href="/web/public/css/right.css">

    <link rel="stylesheet" href="/web/public/css/rss.css">
</head>
<body>
<div class="container">
    <!--这里引入header-->
    <include file="/web/html/header/header.htm" page-type="1"></include>
    <div id="main">
        <div class="top-laber"><div class="top-laber-text">RSS页面</div><img src="/web/img/rss-top_underline.png"></img></div>
        <div class="left">
            <ul class="content-list"></ul>
            <div class="list-pagination"></div>
        </div>
        <div class="right">
            <!--            视频课堂-->
            <include file="/web/html/fragment/video-classroom.htm"></include>
            <!--          亚利聊政采 -->
            <include file="/web/html/fragment/home-inc/yllzc.htm"></include>
            <!--           热点专题 -->
            <include file="/web/html/fragment/home-inc/hot-topic.htm"></include>
            <!--            热点排行-->
            <include file="/web/html/fragment/home-inc/hotspot.htm"></include>
           <!-- 广告位(马老师不确定) -->
            <include file="/web/html/fragment/right-ad.htm"></include>


        </div>
    </div>
    <include file="/web/html/footer/footer.htm"></include>
</div>
<script>
    // var tagId = utils.getQueryVariable('id');
    <!--   TDK与网站首页相同-->
    var tagId = -1;
    $.ajax({
        url:ports.getTagListTdk,
        data: {
            keyword: tagId
        },
        success:function (res) {
            console.log('获取标签列表tdk',res);
            $("title").text(res.data.channelTitle+'-政府采购信息网'||'政府采购信息网');
            $("meta[name='keywords']").prop('content',res.data.channelKeyword||'');
            $("meta[name='description']").prop('content',res.data.channelDescriptions||'');
        }
    })

    function getTagList(pageNum,resetPage){
        var pageSize = 14;
        $.ajax({
            url: ports.getArticleList,
            data: {
                plateIds: tagId,
                page:pageNum,
                size:pageSize
            },
            success:function(res) {
                console.log('获取标签列表11',res);
                var tagListHtml = '';
                var tagList = res.data.list;
                tagList.forEach(function (item) {
                    // var keywordsListHtml = '';
                    // item.articleKeywordList.forEach(function (item1) {
                    //     keywordsListHtml += '<a href='+ '/web/html/list/tag-list.html?id='+item1.id+' class="tag">'+ item1.keyword +'</a>'
                    // })
                    tagListHtml += '<li>\n' +
                        (item.articleImage ?'<div class="left"><img src='+ item.articleImage  +' alt='+ item.articleTitle +'></div>':'')
                         +
                        '                    <div class="right">\n' +
                        '                        <div class="title"><a target="_blank" href='+ item.articleUrl +'>'+ item.articleTitle +'</a></div>\n' +
                        '                        <p>\n' + item.articleInfo +
                        '                        </p>\n' +
                        '                        <div class="info">\n' +
                        '                            <i class="iconfont icon-renwu-touxiang"></i><span>'+ item.articleEditor+'/整理' +'</span>\n' +
                        '                            <i class="iconfont icon-shijian"></i><span>'+ item.createTime.substr(0,10) +'</span>\n' +
                        '\n'
                        // + keywordsListHtml +
                        '                        </div>\n' +
                        '                    </div>\n' +
                        '                </li>'
                })
                $('ul.content-list').html(tagListHtml);
                if(resetPage){
                    $('.list-pagination').pagination({
                        prevContent: '< 上一页',
                        nextContent: '下一页 >',
                        totalData: res.data.total,
                        showData: pageSize,
                        coping: true,
                        callback: function (api) {
                            console.log(api.getCurrent());
                            var current = api.getCurrent();
                            document.body.scrollTop = 0;
                            document.documentElement.scrollTop = 0;
                            getTagList(current,false);
                        }
                    });
                }

            }
        });
    }

    getTagList(1,true);

</script>
</body>
</html>